﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;

using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.Windows.Media.Imaging;


namespace DiChuyenQuanCo
{
    public partial class MainPage : PhoneApplicationPage
    {
        double pX, pY;
        bool flag = false;
       
        public MainPage()
        {
            InitializeComponent();
        }

        public void grid_up(object sender, MouseEventArgs e)
        {
            
            System.Windows.Point position = e.GetPosition(this);
            pX = position.X;
            pY = position.Y;
            if (flag == true)
            {
                btnChot.Margin = new Thickness(pX, pY, 0, 0);
                flag = false;
            }
        }
        
            

        private void button1_Click_1(object sender, RoutedEventArgs e)
        {
            flag = true;
        }

       

        
    }
}